//
//  GqxxViewController.swift
//  Duyiguqin
//
//  Created by 张昭 on 2024/7/29.
//

import WebKit

class GqxxViewController: BaseViewController {
    
    init(title v1: String, url v2: URL) {
        super.init(nibName: nil, bundle: nil)
        titleLabel.text = "古琴学习"
        if let url = URL(string: "http://www.dyxt.org/9duyiqinke/") {
            let request = URLRequest(url: url)
            webView.load(request)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        initializeSubviews()
    }
    
    private let webView = WKWebView()
}

extension GqxxViewController {
    
    private func initializeSubviews() {

        view.addSubview(webView)
        webView.snp.makeConstraints { make in
            make.bottom.equalTo(0)
            make.left.equalTo(0)
            make.right.equalTo(0)
            make.top.equalTo(naviHeaderView.snp.bottom)
        }
    }
}
